# -*- coding: utf-8 -*-
from autogen_ext.tools.mcp import mcp_server_tools, StdioServerParams


class BaseMCPClient:
    """
    MCP 客户端基类
    每个子类需要实现 get_params() 返回 StdioServerParams 配置
    """

    def __init__(self):
        self.tools = []

    async def init_tools(self):
        params = self.get_params()
        self.tools = await mcp_server_tools(params)
        return self.tools

    def get_params(self) -> StdioServerParams:
        """
        子类必须实现此方法，返回 MCP 服务的连接参数
        """
        raise NotImplementedError
